//
//  HomePageCell.swift
//  AESOLAR_IOS
//
//  Created by Mr.Wang on 2019/9/4.
//  Copyright © 2019 Mr.Wang. All rights reserved.
//

import UIKit

class HomePageCell: UITableViewCell {

    override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        
        self.isSkeletonable = false
        self.contentView.isSkeletonable = false
        
        let leftView = UIView()
        leftView.config
            .addTo(self)
            .extra {
                $0.isSkeletonable = true
        }.makeConstraints { (make) in
            make.left.top.equalTo(20)
            make.bottom.equalTo(-20)
            make.width.equalTo(leftView.snp.height)
        }
        
        UILabel().config
            .numberOfLines(0)
            .addTo(self)
            .extra{
                $0.isSkeletonable = true
        }.makeConstraints { (make) in
            make.top.equalTo(leftView.snp.top)
            make.bottom.equalTo(leftView.snp.bottom)
            make.left.equalTo(leftView.snp.left)
            make.right.equalTo(-20)
        }
    }
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
}
